//
//  NSString+WMValid.h
//  WonderBaseSDK_Example
//
//  Created by zero on 2020/5/12.
//  Copyright © 2020 wenhaoChan. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface NSString (WMValid)

/// 是否为中文
- (BOOL)isChinese;

/// 检测身份证是否满18岁
/// @param now 当前服务器时间
- (BOOL)isAdult:(NSDate *)now;

/// 检测身份证是否满18岁且合法
- (BOOL)checkIdCardNumberValid;

/// 是否介于这个时间段内
/// @param startTime 开始时间
/// @param expireTime 结束时间
/// @param date 当前服务器时间
+ (BOOL)between:(NSString *)startTime
             to:(NSString *)expireTime
        withNow:(NSDate*)date;

/// 身份证年龄
/// @param now 当前服务器时间
- (NSUInteger)ageForDate:(NSDate *)now;

/// url 编码
- (NSString *)wm_URLEncode;

/// 对象转 json 字符串
/// @param object object
+ (NSString *)convertToJsonData:(id)object;

- (NSString *)wm_md5;

@end

NS_ASSUME_NONNULL_END
